<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="author" content="featon inc.">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <link rel="stylesheet" href="/static/vendor/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/vendor/bootstrap/css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="/static/vendor/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="/static/vendor/layui/css/layui.css">
    <link rel="stylesheet" href="/static/vendor/show/css/showIndex.css">
    <script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&type=webgl&ak=0jsiswC0QXWftlRmaKfONPS98sbRqnHs"></script>

    <script type="text/javascript">
        //designWidth:设计稿的实际宽度值，需要根据实际设置
        //maxWidth:制作稿的最大宽度值，需要根据实际设置
        //这段js的最后面有两个参数记得要设置，一个为设计稿实际宽度，一个为制作稿最大宽度，例如设计稿为750，最大宽度为750，则为(750,750)
        !function (e, t) {
            function n() {
                var n = l.getBoundingClientRect().width;
                t = t || 540, n > t && (n = t);
                var i = 100 * n / e;
                r.innerHTML = "html{font-size:" + i + "px;}"
            }

            var i, d = document, o = window, l = d.documentElement, r = document.createElement("style");
            if (l.firstElementChild) l.firstElementChild.appendChild(r); else {
                var a = d.createElement("div");
                a.appendChild(r), d.write(a.innerHTML), a = null
            }
            n(), o.addEventListener("resize", function () {
                clearTimeout(i), i = setTimeout(n, 300)
            }, !1), o.addEventListener("pageshow", function (e) {
                e.persisted && (clearTimeout(i), i = setTimeout(n, 300))
            }, !1), "complete" === d.readyState ? d.body.style.fontSize = "16px" : d.addEventListener("DOMContentLoaded", function (e) {
                d.body.style.fontSize = "16px"
            }, !1)
        }(750, 750);



        ;(function(designWidth, maxWidth) {
            var doc = document,
                win = window,
                docEl = doc.documentElement,
                remStyle = document.createElement("style"),
                tid;

            function refreshRem() {
                var width = docEl.getBoundingClientRect().width;
                maxWidth = maxWidth || 540;
                width>maxWidth && (width=maxWidth);
                var rem = width * 100 / designWidth;
                remStyle.innerHTML = 'html{font-size:' + rem + 'px;}';
            }

            if (docEl.firstElementChild) {
                docEl.firstElementChild.appendChild(remStyle);
            } else {
                var wrap = doc.createElement("div");
                wrap.appendChild(remStyle);
                doc.write(wrap.innerHTML);
                wrap = null;
            }
            //要等 wiewport 设置好后才能执行 refreshRem，不然 refreshRem 会执行2次；
            refreshRem();

            win.addEventListener("resize", function() {
                clearTimeout(tid); //防止执行两次
                tid = setTimeout(refreshRem, 300);
            }, false);

            win.addEventListener("pageshow", function(e) {
                if (e.persisted) { // 浏览器后退的时候重新计算
                    clearTimeout(tid);
                    tid = setTimeout(refreshRem, 300);
                }
            }, false);

            if (doc.readyState === "complete") {
                doc.body.style.fontSize = "16px";
            } else {
                doc.addEventListener("DOMContentLoaded", function(e) {
                    doc.body.style.fontSize = "16px";
                }, false);
            }
        })(750, 750);
    </script>

    <title>智慧中蜂数据展示平台</title>
    <style>
        body,html,#container {
            /*// #dituContent 是地图当前div的id*/
            position:absolute;
            z-index: -1;
            width: 100%;
            min-height: 100%;
            overflow: hidden;
            margin: 0;
        }

        #adv{
            width:100%;
            height:100%;
            position:absolute;
            z-index: 1;
            background-image: url(/static/images/show/map/img/bg.png);
            pointer-events: none;
        }

        .BMap_cpyCtrl {
            display: none;
        }

        .anchorBL {
            display: none;
        }

        #central_btn_six:hover ,#central_btn_one:hover ,#central_btn_two:hover,#central_btn_three:hover,#central_btn_four:hover,#central_btn_five:hover{
            background-image: url("/static/images/show/lx_2.png");
        }

        *{margin:0;padding:0;list-style:none;}
        body{font-family:'microsoft yahei';}
        a{text-decoration:none;}
        .showdiv{
            text-align:center;
            display:block;
        }
        /* ��������������֮�� www.lanrenzhijia.com */
        .showbox{width:0px;height:0px;display:none;position:absolute;right:0;top:0;z-index:100;border:1px #19212c solid;padding:1px;background:#19212c;}
        .showbox h2{height:25px;font-size:14px;background-color:#19212c;position:relative;padding-left:10px;line-height:25px;color:#fff;}
        .showbox h2 a{position:absolute;right:10px;top:6px;font-size:12px;background:#19212c}
        .showbox .mainlist{padding:10px;}
        .showbox .mainlist p{font:normal 14px/2 'microsoft yahei';text-indent:2em;color:#333;padding-top:5px;}
        #zhezhao{background-color:#666;position:absolute;z-index:99;left:0;top:0;display:none;width:100%;height:100%;opacity:0.5;filter: alpha(opacity=50);-moz-opacity: 0.5;}


    </style>


</head>
<body>
<!--//标题头部-->
<div class="header">
    <div id="time" style="text-align: center;color: #ffffff;font-size: 14px;margin-top: 2.8%;"> </div>
</div>

<!--登录人员名称-->
<div class="login_user">
    <span id="login_name" style="color: #38e58f ;font-size: 16px;" ></span>
</div>
<!--登录按钮-->
<div class="login_img" id="login_btn">
    <div class="login_text">
        <a href="/show/goLogin" style="color: #38e58f ;font-size: 16px;">登录</a>
    </div>
</div>

<!--退出按钮-->
<div class="loginOut_img" id="loginOut_btn" style="display: none">
    <div class="login_text">
        <a href="/logout" style="color: #38e58f ;font-size: 16px;">退出</a>
    </div>
</div>

<!--中部地图-->
<div id="adv" ></div>
<div id="container"></div>

<!--左上 产品产量-->
<div class="left_one" >
    <div style="text-align: center;margin-top: 0.3vh;"><span style="font-size: 16px;color: #ffffff;">产品产量</span></div>
    <div id="left_one_loop">

    </div>
</div>
<!--左中 花蜜来源及占比-->
<div class="left_two">
    <div style="text-align: center;margin-top: 0.3vh;"><span style="font-size: 16px;color: #ffffff;">蜂蜜来源及占比</span></div>
    <div id="left_two_loop">

    </div>
</div>

<!--左下 蜂群结构-->
<div class="left_three">
    <div style="text-align: center;margin-top: 0.3vh;"><span style="font-size: 16px;color: #ffffff;">蜂群结构</span></div>
    <div id="left_three_loop"></div>
    <div id="qqu" >
        <div style="margin-top:6%">
            <span style="color: #29a56d;font-size: 12px ; margin-left: 15%;">全区总计蜂群</span><br>
            <span id="qqu_num" style="color: #29a56d;font-size: 20px ;margin-left: 15%;"></span>
            <span style="color: #29a56d;font-size: 12px">群</span>
        </div>

    </div>

    <div id="rq" >
        <div style="margin-top:6%">
            <span style="color: #0286ff;font-size: 12px ; margin-left: 8%;">中等群</span>
            <span style="color: #0286ff;font-size: 12px ; margin-left: 1%;">占比</span>
            <span id="zq_percentage" style="color: #0286ff;font-size: 12px ;"></span>
            <span id="zq_num" style="color: #0286ff;font-size: 20px ;margin-left: 15%;"></span>
            <span style="color: #0286ff;font-size: 12px">群</span>
        </div>
    </div>

    <div id="zq" >
        <div style="margin-top:6%">
            <span style="color: #ffd302;font-size: 12px ; margin-left: 15%;">弱群</span>
            <span style="color: #ffd302;font-size: 12px ; margin-left: 1%;">占比</span>
            <span id="rq_percentage" style="color: #ffd302;font-size: 12px;"></span>
            <span id="rq_num" style="color: #ffd302;font-size: 20px ;margin-left: 15%;"></span>
            <span style="color: #ffd302;font-size: 12px">群</span>
        </div>
    </div>

    <div id="qq" >
        <div style="margin-top:6%">
            <span style="color: #fb5274;font-size: 12px ;  margin-left: 15%;">强群</span>
            <span style="color: #fb5274;font-size: 12px ; margin-left: 1%;">占比</span>
            <span id="qq_percentage" style="color: #fb5274;font-size: 12px;"></span>
            <span id="qq_num" style="color: #fb5274;font-size: 20px ;margin-left: 15%;"></span>
            <span style="color: #fb5274;font-size: 12px">群</span>
        </div>
    </div>
</div>

<!--右上 环境监测-->
<div class="right_one">
    <div style="text-align: center;margin-top: 0.3vh;"><span style="font-size: 16px;color: #ffffff;">环境监测</span></div>
    <div style="margin-top: 2%;margin-left: 5%;"><span style="font-size: 14px;color: #1d5b5b;">当前天气</span></div>
    <div style="margin-top: 3%;margin-left: 9%;"><span id="tq" style="font-size: 20px;color: #ffffff;"></span></div>
    <div style="margin-top: -13%;margin-left: 40%;"><span style="font-size: 14px;color: #1d5b5b;">当前温度</span></div>
    <div style="margin-top: 3%;margin-left: 47%;"><span id="wd" style="font-size: 20px;color: #ffffff;"></span></div>
    <div style="margin-top: -13%;margin-left: 75.5%;"><span style="font-size: 14px;color: #1d5b5b;">空气污染指数</span></div>
    <div style="margin-top: 3%;margin-left: 77%;"><span id="pm" style="font-size: 20px;color: #ffffff;"></span>&nbsp;&nbsp;<span id="if" style="font-size: 10px; color: #ffffff;"></span> </div>
    <div style="margin-top: 6%;margin-left: 5%;"><span style="font-size: 14px;color: #1d5b5b;">风向/风力</span></div>
    <div style="margin-top: 3%;margin-left: 9%;"><span id="fx" style="font-size: 20px;color: #ffffff;"></span></div>
    <div style="margin-top: -13%;margin-left: 40%;"><span style="font-size: 14px;color: #1d5b5b;">相对湿度</span></div>
    <div style="margin-top: 3%;margin-left: 47%;"><span id="sd" style="font-size: 20px;color: #ffffff;"></span></div>
    <div style="margin-top: -13%;margin-left: 75.5%;"><span style="font-size: 14px;color: #1d5b5b;">星期</span></div>
    <div style="margin-top: 3%;margin-left: 77%;"><span id="xq" style="font-size: 20px;color: #ffffff;"></span></div>
</div>

<!--右中 企业分布-->
<div class="right_two">
    <div style="text-align: center;margin-top: 0.3vh;"><span style="font-size: 16px;color: #ffffff;">企业分布</span></div>
    <div id="right_two_central">

    </div>

</div>
<!--<button></button>  class="showdiv"-->
<!--右下 产品价格-->
<div class="right_three">
    <div style="text-align: center;margin-top: 0.3vh;"><span style="font-size: 16px;color: #ffffff;">认证品牌</span></div>
    <div id="right_three_broken_1" style="cursor:pointer" onclick="showDiv('琼花珊谷')"></div>
    <div id="right_three_broken_2" style="cursor:pointer" onclick="showDiv('神蜜缘')"></div>
    <div id="right_three_broken_3" style="cursor:pointer" onclick="showDiv('景文清蜂宝')"></div>
    <div id="right_three_broken_4" style="cursor:pointer" onclick="showDiv('秦岭')"></div>
    <div id="right_three_broken_5" style="cursor:pointer" onclick="showDiv('秦德农')"></div>
    <div id="right_three_broken_6"></div>

</div>

<!--中部 六边形-->
<div class="central">
<!--    <div style="text-align: center;margin-top: 0.3vh;"><span style="font-size: 16px;color: #ffffff;">产品价格</span></div>-->
    <div id="central_btn_one" style="cursor:pointer;">
        <div style="text-align: center;margin-top: 2.8vh;">
            <span id="jgCompany_total_num" style="font-size: 34px;color: #ffffff;"></span>
            <span style="font-size: 12px;color: #ffffff;">家</span><br>
            <span style="font-size: 14px;color: #ffffff;">加工企业总数</span>
        </div>
    </div>

    <div id="central_btn_two" style="cursor:pointer;">
        <div style="text-align: center;margin-top: 2.8vh;">
            <span id="scCompany_total_num" style="font-size: 34px;color: #ffffff;"></span>
            <span style="font-size: 12px;color: #ffffff;">家</span><br>
            <span style="font-size: 14px;color: #ffffff;">生产企业总数</span>
        </div>
    </div>

    <div id="central_btn_three" style="cursor:pointer;">
        <div style="text-align: center;margin-top: 2.8vh;">
            <span id="xsCompany_total_num" style="font-size: 34px;color: #ffffff;"></span>
            <span style="font-size: 12px;color: #ffffff;">家</span><br>
            <span style="font-size: 14px;color: #ffffff;">销售企业总数</span>
        </div>
    </div>

    <div id="central_btn_four" style="cursor:pointer;">
        <div style="text-align: center;margin-top: 2.8vh;">
            <span id="fq_total_num" style="font-size: 34px;color: #ffffff;"></span>
            <span style="font-size: 12px;color: #ffffff;">万群</span><br>
            <span style="font-size: 14px;color: #ffffff;">蜂群总数</span>
        </div>
    </div>

    <div id="central_btn_five" style="cursor:pointer;">
        <div style="text-align: center;margin-top: 2.8vh;">
            <span id="cl_total_num" style="font-size: 34px;color: #ffffff;"></span><br>
            <span style="font-size: 12px;color: #ffffff;">千克</span><br>
            <span style="font-size: 14px;color: #ffffff;">总产量</span>
        </div>
    </div>

    <div id="central_btn_six" style="cursor:pointer;">
        <div style="text-align: center;margin-top: 2.8vh;">
            <span id="cz_total_num" style="font-size: 34px;color: #ffffff;"></span><br>
            <span style="font-size: 12px;color: #ffffff;">万元</span><br>
            <span style="font-size: 14px;color: #ffffff;">总产值</span>
        </div>
    </div>

</div>

<!--底部横条-->
<div class="below">

</div>


<!--<a class="showdiv" href="http://www.lanrenzhijia.com/">点击弹出浮层</a>-->
<div class="showbox">
    <h2><a class="close" href="javascript:" ><span style="color:#ffffff">X</span></a></h2>
    <div class="mainlist">
<!--        <p>懒人之家致力于网页脚本代码以及Flash素材的收集与整理，努力为国内前端工作者提供最全面的素材，帮您节约时间做更多的事情！</p>-->
        <div style="margin-top: 3%;margin-left: 15%;">
            <span style="font-size: 14px;color: #ffffff;">企业名称：</span><span id="qyName" style="color: #2eaf7a"></span><br>
        </div>

        <div style="margin-top: 3%;margin-left: 15%;">
            <span style="font-size: 14px;color: #ffffff;">相关证件：</span><span id="qyCredentials" style="color: #2eaf7a"></span><br>
        </div>

        <div style="margin-top: 3%;margin-left: 15%;">
            <span style="font-size: 14px;color: #ffffff;">企业类型：</span><span id="qyType" style="color: #2eaf7a"></span><br>
        </div>

        <div style="margin-top: 3%;margin-left: 15%;">
            <span style="font-size: 14px;color: #ffffff;">负责人：</span><span id="principal" style="color: #2eaf7a"></span><br>
        </div>

        <div style="margin-top: 3%;margin-left: 15%;">
            <span style="font-size: 14px;color: #ffffff;">联系电话：</span><span id="phone" style="color: #2eaf7a"></span><br>
        </div>

        <div style="margin-top: 3%;margin-left: 15%;">
            <span style="font-size: 14px;color: #ffffff;">详细地址：</span><span id="address" style="color: #2eaf7a"></span>
        </div>

    </div>
</div>
<div id="zhezhao"></div>



</body>

<iframe id="targetFrame" name="targetFrame" style="border: 0;" width="0" height="0"></iframe>
<!--<script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&type=webgl&ak=0jsiswC0QXWftlRmaKfONPS98sbRqnHs"></script>-->
<script src="http://api.map.baidu.com/api?v=3.0&ak=0jsiswC0QXWftlRmaKfONPS98sbRqnHs"></script>
<script src="/static/vendor/jquery/jquery-3.3.1.min.js"></script>
<script src="/static/vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="/static/vendor/layui/layui.all.js"></script>
<script src="/static/vendor/show/js/echarts.min.js"></script>
<script src="https://code.bdstatic.com/npm/mapvgl@1.0.0-beta.119/dist/mapvgl.min.js"></script>
<script src="/static/vendor/skin/js/md5.js"></script>
<script src="/static/vendor/skin/js/ajax-util.js"></script>
<script src="/static/vendor/skin/js/index-util.js"></script>
<script src="/static/vendor/show/js/InfoBox_min.js"></script>


<script>
    var ajax = new Ajax();
    var showBean = top.ajax.synclBody("/show/getShowData","");
    function showDiv(str) {
        var qyInfo = top.ajax.synclBody("/show/getQyData",str);
        $("#qyName").text(qyInfo.name);
        $("#qyCredentials").text(qyInfo.yyCode);
        $("#qyType").text(qyInfo.companyType);
        $("#principal").text(qyInfo.legalMan);
        $("#phone").text(qyInfo.phone);
        $("#address").text(qyInfo.address);
        var box =300;
        var th= $(window).scrollTop()+$(window).height()/1.6-box;
        var h =document.body.clientHeight;
        var rw =$(window).width()/2-box;
        $(".showbox").animate({top:th,opacity:'show',width:600,height:340,right:rw},500);
        $("#zhezhao").css({
            display:"block",height:$(document).height()
        });
        return false;
    }
    $(".showbox .close").click(function(){
        $(this).parents(".showbox").animate({top:0,opacity: 'hide',width:0,height:0,right:0},500);
        $("#zhezhao").css("display","none");
    });







    // 产品产量属性开始
    var cp_name_data = [];
    var cp_data = [];
    // 产品产量属性结束

    // 蜂蜜来源占比属性开始
    var sourceData = [];
    // 蜂蜜来源占比属性结束

    //蜂群结构开始；
    var beeSwarmData1 = [];
    var beeSwarmData2 = [];
    var beeSwarmData3 = [];
    //蜂群结构结束；
    // var map = new BMap.Map('container',{
    //         minZoom: 12,
    //         maxZoom: 16
    //     });
    // var point = new BMap.Point(107.243278,34.364386);
    // map.centerAndZoom(point, 13);
    // // 初始化地图，设置中心点坐标和地图级别
    // map.enableScrollWheelZoom(true);
    // // 矢量轮廓
    // map.setMapStyleV2({styleId: 'aa230a0ec4cfd4f1b4e02357f541e26d'});
    // // 地图样式
    // var myIcon = new BMap.Icon("/static/images/show/map/img/pin.png", new BMap.Size(16, 20));
    // var pt = new BMap.Point(107.179462,34.325791);
    // var marker = new BMap.Marker(pt, {
    //     icon: myIcon
    // });
    // map.addOverlay(marker);
    // var html = ["<div class='infoBoxContent'><div style='text-align: center'><span style='color:#1ccf81;font-size: 12px'>高家镇中蜂产业养殖场</span></div>" +
    // "        <div><span style='font-size: 10px;margin-left: 3%;color: #ffffff'>蜂群总量：</span><span style='font-size: 10px;color: #ffffff'>560群</span></div>" +
    // "        <div style='margin-bottom: 2%;'><span style='font-size: 10px;margin-left: 3%;color: #ffffff;'>地址：</span><span style='font-size: 10px;color: #ffffff;'>宝鸡市渭滨区高家镇浦东新区</span></div>"];
    // var infoBox = new BMapLib.InfoBox(map,html.join(""),{
    //     boxStyle:{
    //         // background:"url('tipbox.gif') no-repeat center top"
    //         width: "270px"
    //         ,height: "90px"
    //     }
    //     ,closeIconUrl: "/static/images/show/gb.png"  // 关闭按钮的图片url
    //     ,closeIconMargin: "10px 1px 0 0"
    // });
    //
    // marker.enableDragging();
    //
    // marker.addEventListener("click", function(){
    //     infoBox.open(marker);
    // });



    // var html = ["<div class='infoBoxContent'><div style='text-align: center'><span style='color:#1ccf81;font-size: 12px'>"+projectInfoList[i].name+"</span></div>" +
    // "        <div><span style='font-size: 10px;margin-left: 3%;color: #ffffff'>蜂群总量：</span><span style='font-size: 10px;color: #ffffff'>560群</span></div>" +
    // "        <div style='margin-bottom: 2%;'><span style='font-size: 10px;margin-left: 3%;color: #ffffff;'>地址：</span><span style='font-size: 10px;color: #ffffff;'>宝鸡市渭滨区高家镇浦东新区</span></div>"];

    // cp_data[i] = {value:showBean.cp_cls[i],name:showBean.cp_names[i]}
    var markerArr = [];
    if (showBean.companyList.length > 0){
        for (let i = 0; i < showBean.companyList.length; i++) {
            if (showBean.companyList[i].companyType !== '生产企业'){
            markerArr[i] = {name:showBean.companyList[i].name,companyType:showBean.companyList[i].companyType,point:showBean.companyList[i].longitude+","+showBean.companyList[i].dimensions,address:showBean.companyList[i].address}
            } else {
                markerArr[i] = {name:showBean.companyList[i].name,companyType:showBean.companyList[i].companyType,point:showBean.companyList[i].longitude+","+showBean.companyList[i].dimensions,address:showBean.companyList[i].address,beeHiveNum:showBean.companyList[i].beeHiveNum}
            }
        }
    }

    jQuery(function ($) {
// 封装企业相关信息；
//         console.log(markerArr);
        var map = new BMap.Map('container');
        var point = new BMap.Point(107.243278,34.364386);
        map.centerAndZoom(point, 13);
        // 初始化地图，设置中心点坐标和地图级别
        map.enableScrollWheelZoom(true);
        // 矢量轮廓
        map.setMapStyleV2({styleId: 'aa230a0ec4cfd4f1b4e02357f541e26d'});

        //绘制坐标点
        for (var i = 0; i < markerArr.length; i++) {
            var p0 = markerArr[i].point.split(",")[0];
            var p1 = markerArr[i].point.split(",")[1];
            var marker = addMarker(new window.BMap.Point(p0, p1));
            addInfoWindow(marker, markerArr[i]);
        }

        // 添加标注
        function addMarker(point) {
            var myIcon = new BMap.Icon("/static/images/show/map/img/pin.png", new BMap.Size(16, 20));
            var marker = new BMap.Marker(point, { icon: myIcon });
            map.addOverlay(marker);
            return marker;
        }

        // 添加信息窗口
        function addInfoWindow(marker, poi) {
            //pop弹窗标题
            // var title = '<div style="font-weight:bold;color:#CE5521;font-size:14px">' + poi.title + '</div>';
            //pop弹窗信息
            var html = [];
            if (poi.companyType !== "生产企业"){
            html.push("<div class='infoBoxContent'><div style='text-align: center'><span style='color:#1ccf81;font-size: 12px'>"+poi.name+"</span></div>" +
                "        <div><span style='font-size: 10px;margin-left: 3%;color: #ffffff'>企业类型：</span><span style='font-size: 10px;color: #ffffff'>"+poi.companyType+"</span></div>" +
                "        <div style='margin-bottom: 2%;'><span style='font-size: 10px;margin-left: 3%;color: #ffffff;'>地址：</span><span style='font-size: 10px;color: #ffffff;'>"+poi.address+"</span></div>");
            } else {
                html.push("<div class='infoBoxContent'><div style='text-align: center'><span style='color:#1ccf81;font-size: 12px'>"+poi.name+"</span></div>" +
                    "        <div><span style='font-size: 10px;margin-left: 3%;color: #ffffff'>企业类型：</span><span style='font-size: 10px;color: #ffffff'>"+poi.companyType+"</span></div>" +
                    "        <div style='margin-top: -7.4%'><span style='font-size: 10px;margin-left: 55%;color: #ffffff'>蜂箱数量：</span><span style='font-size: 10px;color: #ffffff'>"+poi.beeHiveNum+"&nbsp;箱</span></div>" +
                    "        <div style='margin-bottom: 2%;'><span style='font-size: 10px;margin-left: 3%;color: #ffffff;'>地址：</span><span style='font-size: 10px;color: #ffffff;'>"+poi.address+"</span></div>");
            }

            var infoBox = new BMapLib.InfoBox(map,html.join(""),{
                boxStyle:{
                    width: "270px"
                    ,height: "90px"
                }
                ,closeIconUrl: "/static/images/show/gb.png"  // 关闭按钮的图片url
                ,closeIconMargin: "10px 1px 0 0"
            });

            var openInfoWinFun = function () {
                infoBox.open(marker);
            };
            marker.addEventListener("click", openInfoWinFun);

        }


    });




    //获取登录人名称；
    ajax.simple('/user/getCurrentUser', {}, getLoginUserBean);

    function getLoginUserBean(obj) {
        LoginUserBean = obj;

        if (LoginUserBean.data !== null){
            $("#login_name").text(LoginUserBean.data.user_realname);
            $("#login_btn").hide();
            $("#loginOut_btn").show();

        }
    }



    jQuery(function($){

        /*窗口自适应，关键代码*/
        $(window).resize(function(){
            left_one_loop.resize();
            left_two_loop.resize();
            right_three_broken.resize();
            right_two_central.resize();
            left_three_loop.resize();
        });


        var tq = ajax.syncl("http://api.k780.com/?app=weather.today&weaid=323&appkey=10003&sign=b59bc3ef6191eb9f747dd4e83c99f2a4&format=json");

        $("#tq").text(tq.result.weather);
        $("#wd").text(tq.result.temperature_curr);

        if ( 0 < parseInt(tq.result.aqi)  &&  parseInt(tq.result.aqi) <= 50){
            $("#pm").text(tq.result.aqi);
            $("#if").text("   优");
        } else if (50 < parseInt(tq.result.aqi) && parseInt(tq.result.aqi) <= 100){
            $("#pm").text(tq.result.aqi);
            $("#if").text("   良");
        } else if (100 < parseInt(tq.result.aqi) && parseInt(tq.result.aqi) <= 150){
            $("#pm").text(tq.result.aqi);
            $("#if").text(" 轻度污染");
        } else if (150 < parseInt(tq.result.aqi) && parseInt(tq.result.aqi) <= 200){
            $("#pm").text(tq.result.aqi);
            $("#if").text(" 中度污染");
        } else if (200 < parseInt(tq.result.aqi) && parseInt(tq.result.aqi) <= 300){
            $("#pm").text(tq.result.aqi);
            $("#if").text(" 重度污染");
        }  else {
            $("#pm").text(tq.result.aqi);
            $("#if").text(" 严重污染");
        }
        $("#fx").text(tq.result.wind +" "+ tq.result.winp);
        $("#sd").text(tq.result.humidity);
        $("#xq").text(tq.result.week);

        //获取时间
        let time = new Date();
        setInterval(() => {
            time = new Date();
            // 转化后的时间：2021/4/22 下午5:54:25
            document.getElementById('time').innerHTML = `${time.toLocaleDateString()} ${time.toLocaleTimeString()}`;
        }, 1000);

    // <span id="rq_percentage" style="color: #ffd302;font-size: 12px;"></span>
    //         <span id="rq_num" style="color: #ffd302;font-size: 20px ;margin-left: 15%;"></span>


        // showBean = top.ajax.synclBody("/show/getShowData","");
        //蜂群总数；
        $("#fq_total_num").text(showBean.totalNum);
        // 加工企业总数
        $("#jgCompany_total_num").text(showBean.jgCompanyTotalNum);
        // 销售企业总数
        $("#xsCompany_total_num").text(showBean.xsCompanyTotalNum);
        // 生产企业总数
        $("#scCompany_total_num").text(showBean.scCompanyTotalNum);
        // 总产量
        $("#cl_total_num").text(showBean.totalOutput);

        // 总产值
        $("#cz_total_num").text(showBean.totalPrice);

        //蜂群结构介绍；
        $("#qqu_num").text(showBean.totalNum);

        if (showBean.beeSwarmNames.length > 0){
            for (let i = 0; i < showBean.beeSwarmNames.length; i++) {
                switch (showBean.beeSwarmNames[i]) {
                    case "强群":
                        $("#qq_num").text(showBean.beeSwarmNums[i]);
                        $("#qq_percentage").text(showBean.strongGroupNumProportion);
                        break;
                    case "中等群":
                        $("#zq_num").text(showBean.beeSwarmNums[i]);
                        $("#zq_percentage").text(showBean.mediumGroupNumProportion);
                        break;
                    case "弱群":
                        $("#rq_num").text(showBean.beeSwarmNums[i]);
                        $("#rq_percentage").text(showBean.weakGroupNumProportion);
                        break;
                }
            }
        }



        // let values=[];
        // for (let i = 0; i < data.deptName.length; i++) {
        //     values[i]={value:data.num[i],name:data.deptName[i]};
        // }


        for (let i = 0; i < showBean.cp_names.length; i++) {
            cp_data[i] = {value:showBean.cp_cls[i],name:showBean.cp_names[i]}
        }
        cp_name_data = showBean.cp_names;

        //产品产量
        var left_one_loop = echarts.init(document.getElementById("left_one_loop"));
        var uploadedDataURL = "/static/images/show/cpcl.png";
        var left_one_loop_option = {
            legend: {
                orient: 'vertical',
                top: "center",
                right: "6%",
                itemWidth: 10,
                itemHeight: 20,
                data: cp_name_data,
                textStyle: {
                    color: "#fff",
                    fontSize: 16
                }
            },
            tooltip: {
                trigger: 'item',
                formatter: '{a} <br/>{b} : {c}千克 ({d}%)'
            },
            graphic: [{
                    // z:4,
                    type: 'image',
                    id: 'logo',
                    left: '35%',
                    top: '40.5%',
                    z: -10,
                    bounding: 'raw',
                    rotation: 0 ,//旋转
                    origin: [64.5, 32.5],//中心点
                    scale: [1.0, 1.0],//缩放
                    style: {
                        image: uploadedDataURL,
                        width: 50,
                        height:50,
                        opacity: 1
                    }
                }],
            series: [{
                name: '产量',
                type: 'pie',
                radius: ['30%', '70%'],
                center: ['40%', '50%'],
                roseType: 'radius',
                label: {
                    show: true,
                    normal: {
                        position: 'outside',
                        fontSize: 16
                    }
                },
                labelLine: {
                    length: 1,
                    length2: 20,
                    smooth: true
                },
                data: cp_data
            }]
        };
        left_one_loop.setOption(left_one_loop_option);


        for (let i = 0; i < showBean.sourceNames.length; i++) {
            sourceData[i] = {value:showBean.sourceNums[i],name:showBean.sourceNames[i]}
        }

        //花蜜来源与占比
        var left_two_loop = echarts.init(document.getElementById("left_two_loop"));
        var fontColor = '#fff';
        var left_two_loop_option = {
            color: ['#bf19ff', '#854cff', '#5f45ff', '#02cdff', '#0090ff', '#f9e264', '#f47a75', '#009db2', '#0780cf', '#765005'],
            textStyle: {
                fontSize: 14
            },
            title: {
                text: '',
                left: 'left',
                textStyle: {
                    color: fontColor,
                    align: 'center',
                }
            },
            grid: {
                left: '1%',
                height: '80%',
                right: '4%',
                bottom: '4%',
                top: '16%',
                containLabel: true
            },
            tooltip: {
                trigger: 'axis',
                // formatter: '{b} : {c}千克',
                axisPointer: {
                    type: 'shadow',
                    label: {
                        show: true,
                        color: '#556677',
                        borderColor: 'rgba(0,0,0,0)',
                        shadowColor: 'rgba(0,0,0,0)',
                        shadowOffsetY: 0,
                    }
                }
            },
            legend: {
                show: true,
                x: 'center',
                top: '3%',
                left:'20%',
                textStyle: {
                    color: fontColor
                },
                data: showBean.productNameList
            },
            xAxis: [{
                type: 'category',
                boundaryGap: false,
                axisLabel: {
                    color: fontColor
                },
                axisLine: {
                    show: true,
                    lineStyle: {
                        color: '#397cbc'
                    }
                },
                data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
            }],
            yAxis: [{
                type: 'value',
                name: '元/公斤',
                splitLine: {     //网格线
                    show: true,
                    lineStyle:{   //x网格线
                        color: '#397cbc'
                    }
                },
                nameTextStyle:{
                    fontSize: 12
                },
                axisLine: {
                    lineStyle: {
                        color: '#397cbc'
                    }
                }
            }],
            series: [{
                // name: '蜂蜜',
                name: showBean.productNameList[0],
                type: 'line',
                // stack: '总量',
                symbolSize: 8,
                label: {
                    normal: {
                        show: false,
                        position: 'top'
                    }
                },
                itemStyle: {
                    normal: {
                        label : {show: false},
                        areaStyle: {
                            //color: '#94C9EC'
                            color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
                                offset: 0,
                                color: 'rgba(7,44,90,0.3)'
                            }, {
                                offset: 1,
                                color: 'rgba(0,146,246,0.9)'
                            }]),
                        }
                    }
                },
                // data: [120, 138, 101, 134, 90, 230, 210, 182, 191, 234, 260, 280]
                data: showBean.fmPriceList
            },
                {
                    // name: '果蜜',
                    name: showBean.productNameList[1],
                    type: 'line',
                    // stack: '总量',
                    symbol: 'circle',
                    symbolSize: 8,
                    label: {
                        normal: {
                            show: false,
                            position: 'top'
                        }
                    },
                    itemStyle: {
                        normal: {
                            label : {show: false},
                            areaStyle: {
                                //color: '#94C9EC'
                                color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
                                    offset: 0,
                                    color: 'rgba(7,44,90,0.3)'
                                }, {
                                    offset: 1,
                                    color: 'rgba(0,212,199,0.9)'
                                }]),
                            }
                        }
                    },
                    // data: [220, 182, 191, 210, 230, 270, 270, 201, 154, 140, 240, 250]
                    data: showBean.gmPriceList
                },
                {
                    // name: '蜂胶',
                    name: showBean.productNameList[2],
                    type: 'line',
                    // stack: '总量',
                    symbol: 'circle',
                    symbolSize: 8,
                    label: {
                        normal: {
                            show: false,
                            position: 'top'
                        }
                    },
                    itemStyle: {
                        normal: {
                            label : {show: false},
                            areaStyle: {
                                //color: '#94C9EC'
                                color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
                                    offset: 0,
                                    color: 'rgba(7,44,90,0.3)'
                                }, {
                                    offset: 1,
                                    color: 'rgba(114,144,89,0.9)'
                                }]),
                            }
                        }
                    },
                    data: showBean.fjPriceList
                },
                {
                    // name: '花粉',
                    name: showBean.productNameList[3],
                    type: 'line',
                    // stack: '总量',
                    symbol: 'circle',
                    symbolSize: 8,
                    label: {
                        normal: {
                            show: false,
                            position: 'top'
                        }
                    },
                    itemStyle: {
                        normal: {
                            label : {show: false},
                            areaStyle: {
                                //color: '#94C9EC'
                                color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
                                    offset: 0,
                                    color: 'rgba(7,46,101,0.3)'
                                }, {
                                    offset: 1,
                                    color: 'rgba(0,166,246,0.9)'
                                }]),
                            }
                        }
                    },
                    // data: [150, 232, 201, 154, 190, 180, 210, 150, 182, 201, 154, 190]
                    data: showBean.hfPriceList
                },
                {
                    // name: '蜂王浆',
                    name: showBean.productNameList[4],
                    type: 'line',
                    // stack: '总量',
                    symbol: 'circle',
                    symbolSize: 8,
                    label: {
                        normal: {
                            show: false,
                            position: 'top'
                        }
                    },
                    itemStyle: {
                        normal: {
                            label : {show: false},
                            areaStyle: {
                                //color: '#94C9EC'
                                color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
                                    offset: 0,
                                    color: 'rgba(7,44,90,0.3)'
                                }, {
                                    offset: 1,
                                    color: 'rgba(0,212,199,0.9)'
                                }]),
                            }
                        }
                    },
                    // data: [150, 232, 201, 154, 190, 180, 210, 150, 182, 201, 154, 190]
                    data: showBean.fwjPriceList
                }
            ]
        };
        left_two_loop.setOption(left_two_loop_option);



        var colorx = ['#0286ff', '#ffd302', '#fb5274'];
        for (let i = 0; i < showBean.beeSwarmNames.length; i++) {
            beeSwarmData1[i] = {value:showBean.beeSwarmNums[i],name:showBean.beeSwarmNames[i],itemStyle: {
                    color: colorx[i],
                }};
            beeSwarmData2[i] = {value:showBean.beeSwarmNums[i],name:showBean.beeSwarmNames[i],itemStyle: {
                    color: colorx[i], opacity: 0.4,
                }};
            beeSwarmData3[i] = {value:showBean.beeSwarmNums[i],name:showBean.beeSwarmNames[i],itemStyle: {
                    color: colorx[i], opacity: 0.1,
                }};
        }

        //蜂群结构
        var left_three_loop = echarts.init(document.getElementById("left_three_loop"));
        var imgURL2 = "/static/images/show/fqjg.png";
        var left_three_loop_option = {
            title: {
                text: '',
                textStyle: {
                    color: '#fff',
                }
            },
            tooltip: {
                trigger: 'item',
                formatter: '{a} <br/>{b} : {c} 群 ({d}%)'
            },
            // tooltip: {
            //     show: true,
            // },
            graphic: [{
                z:10,
                type: 'image',
                id: 'logo',
                left: '46.5%',
                top: '43%',

                bounding: 'raw',
                rotation: 0 ,//旋转
                origin: [64.5, 32.5],//中心点
                scale: [1.0, 1.0],//缩放
                style: {
                    image: imgURL2,
                    // width: 129,
                    // height: 65,
                    opacity: 1
                }
            }],
            series: [{
                    type: 'pie',
                    name: '蜂群结构',
                    radius: ['46%', '60%'],
                    center: ['50%', '50%'],
                    hoverAnimation: false,
                    z: 10,

                    data: beeSwarmData1,
                    label: {
                        show: false,
                    },
                    labelLine: {
                        show: false,
                    },
                },
                {
                    type: 'pie',
                    name: '蜂群结构',
                    radius: ['36%', '45%'],
                    center: ['50%', '50%'],
                    hoverAnimation: false,
                    label: {
                        show: false,
                    },
                    data: beeSwarmData2,
                    labelLine: {
                        show: false,
                    },
                },
                {
                    type: 'pie',
                    name: '蜂群结构',
                    radius: ['30%', '35%'],
                    center: ['50%', '50%'],
                    hoverAnimation: false,
                    label: {
                        show: false,
                    },
                    data: beeSwarmData3,
                    labelLine: {
                        show: false,
                    },
                },
            ],

        };
        left_three_loop.setOption(left_three_loop_option);


        //企业分布；
        var right_two_central = echarts.init(document.getElementById("right_two_central"));
        var xData = function() {
            var data = [];
            for (var i = 1; i < 13; i++) {
                data.push(i + "月份");
            }
            return data;
        }();

        var right_two_central_option = {
            tooltip: {
                axisPointer: {
                    type: "shadow",
                    textStyle: {
                        color: "#fff"
                    }
                },
            },
            grid: {
                borderWidth: 0,
                top: "5%",
                bottom: "25",
                left: "90",
                textStyle: {
                    color: "#fff"
                }
            },
            legend: {
                icon: 'circle',
                right: '4%',
                top: '0%',
                textStyle: {
                    color: '#90979c',
                },
                data: showBean.companyTypeList
            },
            calculable: true,
            xAxis: [{
                type: "value",
                trigger: "axis",
                axisLine: {
                    lineStyle: {
                        color: '#fff'
                    }
                },
                splitLine: {
                    show: false
                },
                axisTick: {
                    show: false
                },
                splitArea: {
                    show: false
                },
                axisLabel: {
                    interval: 0,
                },
                data: xData,
            }],
            yAxis: [{
                type: "category",
                splitLine: {
                    show: false
                },
                axisLine: {
                    lineStyle: {
                        color: '#fff'
                    }
                },
                axisTick: {
                    show: false
                },
                axisLabel: {
                    interval: 0,

                },
                splitArea: {
                    show: false
                },
                // data: ['八鱼镇', '高家镇', '神农镇', '石鼓镇', '马营镇','桥南街道' , '姜谭街道', '清姜街道', '经二路街道','金陵街道'],
                data:showBean.diQuNameList
            }],
            series: [{
                // name: "合作社",
                name: showBean.companyTypeList[0],
                type: "bar",
                stack: "总量",
                barMaxWidth: 15,
                barGap: "10%",
                itemStyle: {
                    normal: {
                        color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
                            offset: 0,
                            color: 'rgba(245,221,111,1)'
                        }, {
                            offset: 1,
                            color: 'rgba(245,221,111,0)'
                        }]),
                        borderColor: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
                            offset: 0,
                            color: 'rgba(245,221,111,1)'
                        }, {
                            offset: 1,
                            color: 'rgba(245,221,111,0)'
                        }]),
                    }
                },
                // data: [15, 5, 8, 9, 12,4,2,12,8,10],
                data: showBean.jgCompanyList,
            },
                {
                    // name: "加工厂",
                    name: showBean.companyTypeList[1],
                    type: "bar",
                    stack: "总量",
                    itemStyle: {
                        normal: {
                            color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
                                offset: 0,
                                color: 'rgba(24,191,207,1)'
                            }, {
                                offset: 1,
                                color: 'rgba(24,191,207,0)'
                            }]),
                            borderColor: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
                                offset: 0,
                                color: 'rgba(24,191,207,1)'
                            }, {
                                offset: 1,
                                color: 'rgba(24,191,207,0)'
                            }]),
                        }
                    },
                    // data: [2,3,4,5,6,7,8,9,10,11]
                    data: showBean.qtCompanyList
                },
                {
                    // name: "养殖场",
                    name: showBean.companyTypeList[2],
                    type: "bar",
                    stack: "总量",
                    itemStyle: {
                        normal: {
                            color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
                                offset: 0,
                                color: 'rgba(98,113,228,1)'
                            }, {
                                offset: 1,
                                color: 'rgba(40,54,117,0)'
                            }]),
                            borderColor: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
                                offset: 0,
                                color: 'rgba(98,113,228,1)'
                            }, {
                                offset: 1,
                                color: 'rgba(40,54,117,0)'
                            }]),
                            "barBorderRadius": 0,
                        }
                    },
                    // data: [3,4,5,6,7,8,9,10,11,12]
                    data: showBean.sellCompanyList
                },
                {
                    // name: "销售企业",
                    name: showBean.companyTypeList[3],
                    type: "bar",
                    stack: "总量",
                    itemStyle: {
                        normal: {
                            color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
                                offset: 0,
                                color: 'rgb(88,72,163,1)'
                            }, {
                                offset: 1,
                                color: 'rgba(88,72,163,0)'
                            }]),
                            borderColor: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
                                offset: 0,
                                color: 'rgba(88,72,163,1)'
                            }, {
                                offset: 1,
                                color: 'rgba(88,72,163,0)'
                            }]),
                            barBorderRadius: 0,
                        }
                    },
                    // data: [15,20,25,30,35,40,45,50,55,60]
                    data: showBean.scCompanyList
                }
            ]
        };

        right_two_central.setOption(right_two_central_option);



    });

</script>

</html>